import request from '@/utils/request'
import qs from 'qs'
// 服务信息聚合列表
export function apiServiceCategoryTree(data) {
    return request({
        method: 'get',
        url: '/serviceInfo/serviceInfoSummaryResDTOList',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
export const apiServiceCategoryGetServiceCategoryWithUnit = (data) => {
	return request({
        method: 'post',
        url: '/serviceCategory/getServiceCategoryWithUnit',
        data: qs.stringify(data),
        headers: {
            "Content-Type": "application/x-www-form-urlencoded"
        }
	})
}



// 区域服务价格修改
export function apiServiceSkuAreaUpdate(data) {
    return request({
        method: 'post',
        url: '/serviceSkuArea/update',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 获取测量安装类目
export function apiServiceCategoryGetRootCategory(data) {
    return request({
        method: 'get',
        url: '/serviceCategory/getRootCategory',
        data: data,
     
    })
}
// 根据服务商品id获取报价信息
export function apiServiceQuotationGetServiceQuotationList(data) {
    return request({
        method: 'post',
        url: '/serviceQuotation/getServiceQuotationList',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 设置平台售价
export function apiServiceQuotationUpdate(data) {
    return request({
        method: 'post',
        url: '/serviceQuotation/update',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 根据类目id获取服务信息
export function apiGetServiceInfoByCategoryId(data) {
    return request({
        method: 'post',
        url: '/serviceInfo/getServiceInfoByCategoryId',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 获取服务分类
export function apiGetSysDistrictTreeWithServiceQuotation(data) {
    return request({
        method: 'post',
        url: '/serviceQuotation/getSysDistrictTreeWithServiceQuotation',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 更新平台服务价格
export function apiServiceQuotationInsertOrUpdateBatch(data) {
    return request({
        method: 'post',
        url: '/serviceQuotation/insertOrUpdateBatch',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 分页
export function apiCommonSaasList(data) {
    return request({
        method: 'post',
        url: '/common/saasList',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 获取服务商saas服务分类
export function apiGetSysDistrictTreeWithSaasService(data) {
    return request({
        method: 'post',
        url: '/saasService/getSysDistrictTreeWithSaasService',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 更新saas服务商价格信息
export function apiSaasServiceInsertOrUpdateBatch(data) {
    return request({
        method: 'post',
        url: '/saasService/insertOrUpdateBatch',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 变更记录
// /priceChangeRecord/getPriceChangeRecordPage
export function apiPriceChangeRecordGetPriceChangeRecordPage(data) {
    return request({
        method: 'post',
        url: '/priceChangeRecord/getPriceChangeRecordPage',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}